package com.z.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.z.common.web.vo.request.PageVo;
import com.z.sys.entity.EmailSend;
import com.z.sys.mapper.EmailSendMapper;
import com.z.sys.service.IEmailSendService;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * 邮件Service业务层处理
 *
 * @author z
 * @date 2023-12-28
 */
@Service
public class EmailSendServiceImpl extends ServiceImpl<EmailSendMapper,EmailSend> implements IEmailSendService {


    /**
     * 查询邮件
     * @param emailSend 邮件
     * @param pageVo
     * @return 邮件 分页集合
     * */
    @Override
    public PageInfo<EmailSend> selectEmailSendPage(EmailSend emailSend, PageVo pageVo) {
        PageHelper.startPage(pageVo.getPage(), pageVo.getLimit());
        List<EmailSend> data = selectEmailSendList(emailSend);
        return new PageInfo<>(data);
    }

    @Override
    public List<EmailSend> selectEmailSendList(EmailSend emailSend) {
        List<EmailSend> data = baseMapper.selectEmailSendList(emailSend);
        return data;
    }
}
